# 菜鸟教程学习
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt

# 测试numpy是否安装成功
print("test nump:\n", np.eye(4))
print("test scipy:\n", sp.rand)
# print("test mp:\n", mp.test)
# Numpy的基础使用
# NArray
# nump.array(object, dtype = None, copy = True, order = None, subok = False, ndmin = 0)
arr1 = np.array([1, 2, 3])
arr13 = np.array([1, 2, 3], ndmin=3)
arr2 = np.array([[1, 2, 3], [1, 2, 3]])
arr3 = np.array([[[1, 2, 3], [1, 2, 3]], [[1, 1, 2], [2, 3, 4]]])
print(arr1, arr2, arr3)
print(arr13)
# 测试
x = [1, 2, 3]
y = [2, 3, 4]
plt.plot(x, y)
plt.show()
